<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
BSPTree (Commons Math 3.2 API)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="BSPTree (Commons Math 3.2 API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/BSPTree.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BoundaryAttribute.html" title="class in org.apache.commons.math3.geometry.partitioning"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.LeafMerger.html" title="interface in org.apache.commons.math3.geometry.partitioning"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html?org/apache/commons/math3/geometry/partitioning/BSPTree.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="BSPTree.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.commons.math3.geometry.partitioning</FONT>
<BR>
Class BSPTree&lt;S extends <A HREF="../../../../../../org/apache/commons/math3/geometry/Space.html" title="interface in org.apache.commons.math3.geometry">Space</A>&gt;</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.math3.geometry.partitioning.BSPTree&lt;S&gt;</B>
</PRE>
<DL>
<DT><DT><B>Type Parameters:</B><DD><CODE>S</CODE> - Type of the space.</DL>
<HR>
<DL>
<DT><PRE>public class <B>BSPTree&lt;S extends <A HREF="../../../../../../org/apache/commons/math3/geometry/Space.html" title="interface in org.apache.commons.math3.geometry">Space</A>&gt;</B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
</PRE>

<P>
This class represent a Binary Space Partition tree.

 <p>BSP trees are an efficient way to represent space partitions and
 to associate attributes with each cell. Each node in a BSP tree
 represents a convex region which is partitioned in two convex
 sub-regions at each side of a cut hyperplane. The root tree
 contains the complete space.</p>

 <p>The main use of such partitions is to use a boolean attribute to
 define an inside/outside property, hence representing arbitrary
 polytopes (line segments in 1D, polygons in 2D and polyhedrons in
 3D) and to operate on them.</p>

 <p>Another example would be to represent Voronoi tesselations, the
 attribute of each cell holding the defining point of the cell.</p>

 <p>The application-defined attributes are shared among copied
 instances and propagated to split parts. These attributes are not
 used by the BSP-tree algorithms themselves, so the application can
 use them for any purpose. Since the tree visiting method holds
 internal and leaf nodes differently, it is possible to use
 different classes for internal nodes attributes and leaf nodes
 attributes. This should be used with care, though, because if the
 tree is modified in any way after attributes have been set, some
 internal nodes may become leaf nodes and some leaf nodes may become
 internal nodes.</p>

 <p>One of the main sources for the development of this package was
 Bruce Naylor, John Amanatides and William Thibault paper <a
 href="http://www.cs.yorku.ca/~amana/research/bsptSetOp.pdf">Merging
 BSP Trees Yields Polyhedral Set Operations</a> Proc. Siggraph '90,
 Computer Graphics 24(4), August 1990, pp 115-124, published by the
 Association for Computing Machinery (ACM).</p>
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>3.0</DD>
<DT><B>Version:</B></DT>
  <DD>$Id: BSPTree.java 1416643 2012-12-03 19:37:14Z tn $</DD>
</DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->

<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;interface</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.LeafMerger.html" title="interface in org.apache.commons.math3.geometry.partitioning">BSPTree.LeafMerger</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.LeafMerger.html" title="type parameter in BSPTree.LeafMerger">S</A> extends <A HREF="../../../../../../org/apache/commons/math3/geometry/Space.html" title="interface in org.apache.commons.math3.geometry">Space</A>&gt;</B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This interface gather the merging operations between a BSP tree
 leaf and another BSP tree.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#BSPTree()">BSPTree</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Build a tree having only one root cell representing the whole space.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#BSPTree(java.lang.Object)">BSPTree</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;attribute)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Build a tree having only one root cell representing the whole space.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#BSPTree(org.apache.commons.math3.geometry.partitioning.SubHyperplane, org.apache.commons.math3.geometry.partitioning.BSPTree, org.apache.commons.math3.geometry.partitioning.BSPTree, java.lang.Object)">BSPTree</A></B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">SubHyperplane</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;cut,
        <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;plus,
        <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;minus,
        <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;attribute)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Build a BSPTree from its underlying elements.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#copySelf()">copySelf</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copy the instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getAttribute()">getAttribute</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the attribute associated with the instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getCell(org.apache.commons.math3.geometry.Vector)">getCell</A></B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/Vector.html" title="interface in org.apache.commons.math3.geometry">Vector</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;point)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the cell to which a point belongs.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">SubHyperplane</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getCut()">getCut</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the cut sub-hyperplane.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getMinus()">getMinus</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the tree on the minus side of the cut hyperplane.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getParent()">getParent</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the parent node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getPlus()">getPlus</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the tree on the plus side of the cut hyperplane.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#insertCut(org.apache.commons.math3.geometry.partitioning.Hyperplane)">insertCut</A></B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Hyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">Hyperplane</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;hyperplane)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insert a cut sub-hyperplane in a node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#insertInTree(org.apache.commons.math3.geometry.partitioning.BSPTree, boolean)">insertInTree</A></B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;parentTree,
             boolean&nbsp;isPlusChild)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insert the instance into another tree.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#merge(org.apache.commons.math3.geometry.partitioning.BSPTree, org.apache.commons.math3.geometry.partitioning.BSPTree.LeafMerger)">merge</A></B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;tree,
      <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.LeafMerger.html" title="interface in org.apache.commons.math3.geometry.partitioning">BSPTree.LeafMerger</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;leafMerger)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Merge a BSP tree with the instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#setAttribute(java.lang.Object)">setAttribute</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;attribute)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Associate an attribute with the instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#split(org.apache.commons.math3.geometry.partitioning.SubHyperplane)">split</A></B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">SubHyperplane</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;sub)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Split a BSP tree by an external sub-hyperplane.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#visit(org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor)">visit</A></B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTreeVisitor.html" title="interface in org.apache.commons.math3.geometry.partitioning">BSPTreeVisitor</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;visitor)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Visit the BSP tree nodes.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="BSPTree()"><!-- --></A><H3>
BSPTree</H3>
<PRE>
public <B>BSPTree</B>()</PRE>
<DL>
<DD>Build a tree having only one root cell representing the whole space.
<P>
</DL>
<HR>

<A NAME="BSPTree(java.lang.Object)"><!-- --></A><H3>
BSPTree</H3>
<PRE>
public <B>BSPTree</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;attribute)</PRE>
<DL>
<DD>Build a tree having only one root cell representing the whole space.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>attribute</CODE> - attribute of the tree (may be null)</DL>
</DL>
<HR>

<A NAME="BSPTree(org.apache.commons.math3.geometry.partitioning.SubHyperplane, org.apache.commons.math3.geometry.partitioning.BSPTree, org.apache.commons.math3.geometry.partitioning.BSPTree, java.lang.Object)"><!-- --></A><H3>
BSPTree</H3>
<PRE>
public <B>BSPTree</B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">SubHyperplane</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;cut,
               <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;plus,
               <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;minus,
               <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;attribute)</PRE>
<DL>
<DD>Build a BSPTree from its underlying elements.
 <p>This method does <em>not</em> perform any verification on
 consistency of its arguments, it should therefore be used only
 when then caller knows what it is doing.</p>
 <p>This method is mainly useful kto build trees
 bottom-up. Building trees top-down is realized with the help of
 method <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#insertCut(org.apache.commons.math3.geometry.partitioning.Hyperplane)"><CODE>insertCut</CODE></A>.</p>
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>cut</CODE> - cut sub-hyperplane for the tree<DD><CODE>plus</CODE> - plus side sub-tree<DD><CODE>minus</CODE> - minus side sub-tree<DD><CODE>attribute</CODE> - attribute associated with the node (may be null)<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#insertCut(org.apache.commons.math3.geometry.partitioning.Hyperplane)"><CODE>insertCut(org.apache.commons.math3.geometry.partitioning.Hyperplane<S>)</CODE></A></DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="insertCut(org.apache.commons.math3.geometry.partitioning.Hyperplane)"><!-- --></A><H3>
insertCut</H3>
<PRE>
public boolean <B>insertCut</B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Hyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">Hyperplane</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;hyperplane)</PRE>
<DL>
<DD>Insert a cut sub-hyperplane in a node.
 <p>The sub-tree starting at this node will be completely
 overwritten. The new cut sub-hyperplane will be built from the
 intersection of the provided hyperplane with the cell. If the
 hyperplane does intersect the cell, the cell will have two
 children cells with <code>null</code> attributes on each side of
 the inserted cut sub-hyperplane. If the hyperplane does not
 intersect the cell then <em>no</em> cut hyperplane will be
 inserted and the cell will be changed to a leaf cell. The
 attribute of the node is never changed.</p>
 <p>This method is mainly useful when called on leaf nodes
 (i.e. nodes for which <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getCut()"><CODE>getCut</CODE></A> returns
 <code>null</code>), in this case it provides a way to build a
 tree top-down (whereas the <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#BSPTree(org.apache.commons.math3.geometry.partitioning.SubHyperplane, org.apache.commons.math3.geometry.partitioning.BSPTree, org.apache.commons.math3.geometry.partitioning.BSPTree, java.lang.Object)"><CODE>4 arguments constructor</CODE></A> is devoted to
 build trees bottom-up).</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>hyperplane</CODE> - hyperplane to insert, it will be chopped in
 order to fit in the cell defined by the parent nodes of the
 instance
<DT><B>Returns:</B><DD>true if a cut sub-hyperplane has been inserted (i.e. if
 the cell now has two leaf child nodes)<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#BSPTree(org.apache.commons.math3.geometry.partitioning.SubHyperplane, org.apache.commons.math3.geometry.partitioning.BSPTree, org.apache.commons.math3.geometry.partitioning.BSPTree, java.lang.Object)"><CODE>BSPTree(SubHyperplane, BSPTree, BSPTree, Object)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="copySelf()"><!-- --></A><H3>
copySelf</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt; <B>copySelf</B>()</PRE>
<DL>
<DD>Copy the instance.
 <p>The instance created is completely independant of the original
 one. A deep copy is used, none of the underlying objects are
 shared (except for the nodes attributes and immutable
 objects).</p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a new tree, copy of the instance</DL>
</DD>
</DL>
<HR>

<A NAME="getCut()"><!-- --></A><H3>
getCut</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">SubHyperplane</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt; <B>getCut</B>()</PRE>
<DL>
<DD>Get the cut sub-hyperplane.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>cut sub-hyperplane, null if this is a leaf tree</DL>
</DD>
</DL>
<HR>

<A NAME="getPlus()"><!-- --></A><H3>
getPlus</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt; <B>getPlus</B>()</PRE>
<DL>
<DD>Get the tree on the plus side of the cut hyperplane.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>tree on the plus side of the cut hyperplane, null if this
 is a leaf tree</DL>
</DD>
</DL>
<HR>

<A NAME="getMinus()"><!-- --></A><H3>
getMinus</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt; <B>getMinus</B>()</PRE>
<DL>
<DD>Get the tree on the minus side of the cut hyperplane.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>tree on the minus side of the cut hyperplane, null if this
 is a leaf tree</DL>
</DD>
</DL>
<HR>

<A NAME="getParent()"><!-- --></A><H3>
getParent</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt; <B>getParent</B>()</PRE>
<DL>
<DD>Get the parent node.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>parent node, null if the node has no parents</DL>
</DD>
</DL>
<HR>

<A NAME="setAttribute(java.lang.Object)"><!-- --></A><H3>
setAttribute</H3>
<PRE>
public void <B>setAttribute</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;attribute)</PRE>
<DL>
<DD>Associate an attribute with the instance.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>attribute</CODE> - attribute to associate with the node<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getAttribute()"><CODE>getAttribute()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getAttribute()"><!-- --></A><H3>
getAttribute</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>getAttribute</B>()</PRE>
<DL>
<DD>Get the attribute associated with the instance.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>attribute associated with the node or null if no
 attribute has been explicitly set using the <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#setAttribute(java.lang.Object)"><CODE>setAttribute</CODE></A> method<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#setAttribute(java.lang.Object)"><CODE>setAttribute(java.lang.Object)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="visit(org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor)"><!-- --></A><H3>
visit</H3>
<PRE>
public void <B>visit</B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTreeVisitor.html" title="interface in org.apache.commons.math3.geometry.partitioning">BSPTreeVisitor</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;visitor)</PRE>
<DL>
<DD>Visit the BSP tree nodes.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>visitor</CODE> - object visiting the tree nodes</DL>
</DD>
</DL>
<HR>

<A NAME="getCell(org.apache.commons.math3.geometry.Vector)"><!-- --></A><H3>
getCell</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt; <B>getCell</B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/Vector.html" title="interface in org.apache.commons.math3.geometry">Vector</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;point)</PRE>
<DL>
<DD>Get the cell to which a point belongs.
 <p>If the returned cell is a leaf node the points belongs to the
 interior of the node, if the cell is an internal node the points
 belongs to the node cut sub-hyperplane.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>point</CODE> - point to check
<DT><B>Returns:</B><DD>the tree cell to which the point belongs (can be</DL>
</DD>
</DL>
<HR>

<A NAME="merge(org.apache.commons.math3.geometry.partitioning.BSPTree, org.apache.commons.math3.geometry.partitioning.BSPTree.LeafMerger)"><!-- --></A><H3>
merge</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt; <B>merge</B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;tree,
                        <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.LeafMerger.html" title="interface in org.apache.commons.math3.geometry.partitioning">BSPTree.LeafMerger</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;leafMerger)</PRE>
<DL>
<DD>Merge a BSP tree with the instance.
 <p>All trees are modified (parts of them are reused in the new
 tree), it is the responsibility of the caller to ensure a copy
 has been done before if any of the former tree should be
 preserved, <em>no</em> such copy is done here!</p>
 <p>The algorithm used here is directly derived from the one
 described in the Naylor, Amanatides and Thibault paper (section
 III, Binary Partitioning of a BSP Tree).</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>tree</CODE> - other tree to merge with the instance (will be
 <em>unusable</em> after the operation, as well as the
 instance itself)<DD><CODE>leafMerger</CODE> - object implementing the final merging phase
 (this is where the semantic of the operation occurs, generally
 depending on the attribute of the leaf node)
<DT><B>Returns:</B><DD>a new tree, result of <code>instance &lt;op&gt;
 tree</code>, this value can be ignored if parentTree is not null
 since all connections have already been established</DL>
</DD>
</DL>
<HR>

<A NAME="split(org.apache.commons.math3.geometry.partitioning.SubHyperplane)"><!-- --></A><H3>
split</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt; <B>split</B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">SubHyperplane</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;sub)</PRE>
<DL>
<DD>Split a BSP tree by an external sub-hyperplane.
 <p>Split a tree in two halves, on each side of the
 sub-hyperplane. The instance is not modified.</p>
 <p>The tree returned is not upward-consistent: despite all of its
 sub-trees cut sub-hyperplanes (including its own cut
 sub-hyperplane) are bounded to the current cell, it is <em>not</em>
 attached to any parent tree yet. This tree is intended to be
 later inserted into an higher level tree.</p>
 <p>The algorithm used here is the one given in Naylor, Amanatides
 and Thibault paper (section III, Binary Partitioning of a BSP
 Tree).</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sub</CODE> - partitioning sub-hyperplane, must be already clipped
 to the convex region represented by the instance, will be used as
 the cut sub-hyperplane of the returned tree
<DT><B>Returns:</B><DD>a tree having the specified sub-hyperplane as its cut
 sub-hyperplane, the two parts of the split instance as its two
 sub-trees and a null parent</DL>
</DD>
</DL>
<HR>

<A NAME="insertInTree(org.apache.commons.math3.geometry.partitioning.BSPTree, boolean)"><!-- --></A><H3>
insertInTree</H3>
<PRE>
public void <B>insertInTree</B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</A>&gt;&nbsp;parentTree,
                         boolean&nbsp;isPlusChild)</PRE>
<DL>
<DD>Insert the instance into another tree.
 <p>The instance itself is modified so its former parent should
 not be used anymore.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>parentTree</CODE> - parent tree to connect to (may be null)<DD><CODE>isPlusChild</CODE> - if true and if parentTree is not null, the
 resulting tree should be the plus child of its parent, ignored if
 parentTree is null<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.LeafMerger.html" title="interface in org.apache.commons.math3.geometry.partitioning"><CODE>BSPTree.LeafMerger</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/BSPTree.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BoundaryAttribute.html" title="class in org.apache.commons.math3.geometry.partitioning"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.LeafMerger.html" title="interface in org.apache.commons.math3.geometry.partitioning"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html?org/apache/commons/math3/geometry/partitioning/BSPTree.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="BSPTree.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2003-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>
